home *** CD-ROM | disk | FTP | other *** search
/ Linux Cubed Series 3: Developer Tools / Linux Cubed Series 3 - Developer Tools.iso / devel / lang / fortran / f2c-9510.000 / f2c-9510 / f2c-951007-libs-1.1 / src / readme < prev    next >
Encoding:
Text File  |  1995-10-07  |  6.3 KB  |  146 lines

  1. Type "make" to check the validity of the f2c source and compile f2c.
  2.  
  3. On a PC, you may need to compile xsum.c with -DMSDOS (i.e., with
  4. MSDOS #defined).
  5.  
  6. If your compiler does not understand ANSI/ISO C syntax (i.e., if
  7. you have a K&R C compiler), compile with -DKR_headers .
  8.  
  9. On non-Unix systems where files have separate binary and text modes,
  10. you may need to "make xsumr.out" rather than "make xsum.out".
  11.  
  12. If (in accordance with what follows) you need to modify the makefile
  13. or any of the source files, first issue a "make xsum.out" (or, if
  14. appropriate, "make xsumr.out") to check the validity of the f2c source,
  15. then make your changes, then type "make f2c".
  16.  
  17. The file usignal.h is for the benefit of strictly ANSI include files
  18. on a UNIX system -- the ANSI signal.h does not define SIGHUP or SIGQUIT.
  19. You may need to modify usignal.h if you are not running f2c on a UNIX
  20. system.
  21.  
  22. Should you get the message "xsum0.out xsum1.out differ", see what lines
  23. are different (`diff xsum0.out xsum1.out`) and ask netlib
  24. (e.g., netlib@research.att.com) to send you the files in question,
  25. plus the current xsum0.out (which may have changed) "from f2c/src".
  26. For example, if exec.c and expr.c have incorrect check sums, you would
  27. send netlib the message
  28.     send exec.c expr.c xsum0.out from f2c/src
  29. You can also ftp these files from netlib.att.com; for more details, ask
  30. netlib@research.att.com to "send readme from f2c".
  31.  
  32. On some systems, the malloc and free in malloc.c let f2c run faster
  33. than do the standard malloc and free.  Other systems may not tolerate
  34. redefinition of malloc and free (though changes of 8 Nov. 1994 may
  35. render this less of a problem than hitherto).  If yours is such a
  36. system, you may either modify the makefile appropriately (remove
  37. "malloc.o" from the "OBJECTS =" assignment), or simply execute
  38.     cc -c -DCRAY malloc.c
  39. before typing "make".  Still other systems have a -lmalloc that
  40. provides performance competitive with that from malloc.c; you may
  41. wish to compare the two on your system.
  42.  
  43. On some BSD systems, you may need to create a file named "string.h"
  44. whose single line is
  45. #include <strings.h>
  46. you may need to add " -Dstrchr=index" to the "CFLAGS =" assignment
  47. in the makefile, and you may need to add " memset.o" to the "OBJECTS ="
  48. assignment in the makefile -- see the comments in memset.c .
  49.  
  50. For non-UNIX systems, you may need to change some things in sysdep.c,
  51. such as the choice of intermediate file names.
  52.  
  53. On some systems, you may need to modify parts of sysdep.h (which is
  54. included by defs.h).  In particular, for Sun 4.1 systems and perhaps
  55. some others, you need to comment out the typedef of size_t.  For some
  56. systems (e.g., IRIX 4.0.1 and AIX) it is better to add
  57. #define ANSI_Libraries
  58. to the beginning of sysdep.h (or to supply -DANSI_Libraries in the
  59. makefile).
  60.  
  61. Alas, some systems #define __STDC__ but do not provide a true standard
  62. (ANSI or ISO) C environment, e.g. do not provide stdlib.h .  If yours
  63. is such a system, then (a) you should complain loudly to your vendor
  64. about __STDC__ being erroneously defined, and (b) you should insert
  65. #undef __STDC__
  66. at the beginning of sysdep.h .  You may need to make other adjustments.
  67.  
  68. For some non-ANSI versions of stdio, you must change the values given
  69. to binread and binwrite in sysdep.c from "rb" and "wb" to "r" and "w".
  70. You may need to make this change if you run f2c and get an error
  71. message of the form
  72.     Compiler error ... cannot open intermediate file ...
  73.  
  74. On many systems, it is best to combine libF77 and libI77 into a single
  75. library, say libf2c, as suggested in "readme from f2c".  If you do not
  76. do this, then you should adjust the definition of link_msg in sysdep.c
  77. appropriately (e.g., replacing "-lf2c" by "-lF77 -lI77").  On Unix
  78. systems, the easiest way to create libf2c.a is to make libF77/libF77.a
  79. and libI77/libI77.a (after reading and heeding libF77/README and
  80. libI77/README), and then to say
  81.  
  82.     cp libF77/libF77.a libf2c.a
  83.     ar ruv libf2c.a libI77/*.o
  84.     ranlib libf2c.a
  85.  
  86. The last step, ranlib, may not be necessary on your system.  On
  87. other systems, just compile all the .c files in libF77 and libI77,
  88. and put the resulting objects (except one or both of the Version
  89. objects) into a library, called perhaps f2c.lib .
  90.  
  91. Some older C compilers object to
  92.     typedef void (*foo)();
  93. or to
  94.     typedef void zap;
  95.     zap (*foo)();
  96. If yours is such a compiler, change the definition of VOID in
  97. f2c.h from void to int.
  98.  
  99. For convenience with systems that use control-Z to denote end-of-file,
  100. f2c treats control-Z characters (ASCII 26, '\x1a') that appear at the
  101. beginning of a line as an end-of-file indicator.  You can disable this
  102. test by compiling lex.c with NO_EOF_CHAR_CHECK #defined, or can
  103. change control-Z to some other character by #defining EOF_CHAR to
  104. be the desired value.
  105.  
  106.  
  107. If your machine has IEEE, VAX, or IBM-mainframe arithmetic, but your
  108. printf is inaccurate (e.g., with Symantec C++ version 6.0,
  109. printf("%.17g",12.) prints 12.000000000000001), you can make f2c print
  110. correctly rounded numbers by compiling with -DUSE_DTOA and adding
  111. dtoa.o g_fmt.o to the makefile's OBJECTS = line, so it becomes
  112.  
  113.     OBJECTS = $(OBJECTSd) malloc.o dtoa.o g_fmt.o
  114.  
  115. Also add the rule
  116.  
  117.     dtoa.o: dtoa.c
  118.         $(CC) -c $(CFLAGS) -DMALLOC=ckalloc -DIEEE... dtoa.c
  119.  
  120. (without the initial tab) to the makefile, where IEEE... is one of
  121. IEEE_MC68k, IEEE_8087, VAX, or IBM, depending on your machine's
  122. arithmetic.  See the comments near the start of dtoa.c.
  123.  
  124. The relevant source files, dtoa.c and g_fmt.c, are available
  125. separately from netlib's fp directory.  For example, you could
  126. send the E-mail message
  127.  
  128.     send dtoa.c g_fmt.c from fp
  129.  
  130. to netlib@research.att.com (or use anonymous ftp from netlib.att.com
  131. and look in directory /netlib/fp).
  132.  
  133. The makefile has a rule for creating tokdefs.h.  If you cannot use the
  134. makefile, an alternative is to extract tokdefs.h from the beginning of
  135. gram.c: it's the first 100 lines.
  136.  
  137.  
  138. Please send bug reports to dmg@research.att.com .  The old index file
  139. (now called "readme" due to unfortunate changes in netlib conventions:
  140. "send readme from f2c") will report recent changes in the recent-change
  141. log at its end; all changes will be shown in the "changes" file
  142. ("send changes from f2c").  To keep current source, you will need to
  143. request xsum0.out and version.c, in addition to the changed source
  144. files.  Changes first appear on netlib@research.att.com, and in due
  145. time propagate to the other netlib sites that are kept current.
  146.